<?php
include_once BONE_ROOT.DS.APP_DIR.DS.'templates'.DS.'menu'.DS.'menu.php';

class template_group_edit extends template_menu
{

	protected function center()
	{
		
		$group = $this->get('group');
		$this->toolbar();
		?>

<div class="box">
	<div class="box-tl"><div class="box-tr"><div class="box-tm"></div></div></div>	
	<div class="box-m">
		
		<h3 class="title"><?php echo $this->get_title(); ?></h3>
		<form action="./" method="post">
		<table class="edit-table">
		<tbody>
		<tr>
		<td class="key">菜单组名称</td>
		<td><input type="text" name="name" value="<?php echo $group->name; ?>" /></td>
		</tr>
		<tr>
		<td class="key">调用类名</td>
		<td>
		<?php
		if($group->class_name=='main' || $group->class_name=='foot')
		{
			echo $group->class_name;
			?>
			<input type="hidden" name="class_name" value="<?php echo $group->class_name; ?>" />
			<?php
		}
		else
		{
			?>
			<input type="text" name="class_name" value="<?php echo $group->class_name; ?>" />
			<?php
		}
		?>
		
		</td>
		</tr>
		<tr>
		<td class="key">调用范围</td>
		<td>
			<?php
			if($group->id)
			{
				echo $group->is_backend?'后台':'前台';
				?>
				<input type="hidden" name="is_backend" value="<?php echo $group->is_backend; ?>" />
				<?php
			}
			else
			{
				?>
				<label><input type="radio" name="is_backend" value="0" <?php echo $group->is_backend?'':'checked'; ?> />前台</label> &nbsp; 
				<label><input type="radio" name="is_backend" value="1" <?php echo $group->is_backend?'checked':''; ?>/>后台</label>
				<?php
			}
			?>
		</td>
		</tr>
		<tr>
		<td class="key"></td>
		<td>
		<input class="btn" type="submit" value="保存" /> <input class="btn" type="button" value="返回" onclick="javascript:window.history.go(-1);" />
		</td>
		</tr>
		</tbody>
		</table>
		<input type="hidden" name="id" value="<?php echo $group->id; ?>" />
		<input type="hidden" name="controller" value="menu" />
		<input type="hidden" name="task" value="group_edit_save" />
		</form>
	</div>
	<div class="box-bl"><div class="box-br"><div class="box-bm"></div></div></div>
</div>
		

		<?php
		
	}	

}
?>